home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / prefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-10-17  |  3.1 KB  |  123 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. #ifndef PREFS_H
  8. #define PREFS_H
  9.  
  10. #include "scribusapi.h"
  11. #include "scribus.h"
  12. #include "prefsdialogbase.h"
  13.  
  14. class TabTypograpy;
  15. class HySettings;
  16. class CMSPrefs;
  17. class TabGuides;
  18. class TabTools;
  19. class TabCheckDoc;
  20. class TabPDFOptions;
  21. class FontPrefs;
  22. class DocumentItemAttributes;
  23. class TOCIndexPrefs;
  24. class MarginWidget;
  25. class PrefsManager;
  26. class PageLayouts;
  27. class TabExternalToolsWidget;
  28. class TabKeyboardShortcutsWidget;
  29. class PluginManagerPrefsGui;
  30. class TabGeneral;
  31. class TabDisplay;
  32. class TabDocument;
  33. class TabMiscellaneous;
  34. class TabScrapbook;
  35. class TabPrinter;
  36.  
  37.  
  38. /*! \brief A Preferences dialog.
  39. It's modular now. You can see a lot of special widgets here
  40. but no QWidget itself. Most of the "panels" are converted
  41. into UI files with Scribus's standard convention:
  42. foobase - foo inherited.
  43. \author Petr Vanek <petr@scribus.info>
  44. */
  45. class SCRIBUS_API Preferences : public PrefsDialogBase
  46. {
  47.     Q_OBJECT
  48.  
  49. public:
  50.     
  51.     /*!
  52.     \author Franz Schmid
  53.     \brief Constructor for Preferences dialog box
  54.     \param parent QWidget pointer to parent window
  55.     */
  56.     Preferences( QWidget* parent);
  57.     ~Preferences(){};
  58.  
  59.     void updatePreferences();
  60.  
  61. public slots:
  62.     /// \brief Overridden to emit accepted(), which plugin panels use
  63.     void accept();
  64.  
  65.     /*!
  66.     \author Franz Schmid
  67.     \brief Preferences (Document / Page Size), switches default between Facing Pages and swaps text labels for margin guides
  68.      */
  69.     void setDS(int layout);
  70.     /*!
  71.     \author Franz Schmid
  72.     \brief Preferences (General, Units). Sets scaling factors and units descriptions when default units are changed. Updates preference values
  73.     */
  74.     void unitChange();
  75.  
  76.     void switchCMS(bool enable);
  77.  
  78. protected:
  79.     TabGeneral* tabGeneral;
  80.     TabGuides* tabGuides;
  81.     TabTypograpy* tabTypo;
  82.     TabDisplay* tabView;
  83.     TabTools* tabTools;
  84.     HySettings* tabHyphenator;
  85.     FontPrefs* tabFonts;
  86.     TabPrinter* tabPrinter;
  87.     TabCheckDoc* tabDocChecker;
  88.     CMSPrefs* tabColorManagement;
  89.     TabPDFOptions* tabPDF;
  90.     DocumentItemAttributes* tabDefaultItemAttributes;
  91.     TOCIndexPrefs* tabDefaultTOCIndexPrefs;
  92.     TabExternalToolsWidget* tabExtTools;
  93.     TabKeyboardShortcutsWidget* tabKeyboardShortcuts;
  94.     TabScrapbook* tabScrapbook;
  95.     TabDocument* tabDocument;
  96.     TabMiscellaneous* tabMiscellaneous;
  97.     PluginManagerPrefsGui* pluginManagerPrefsGui;
  98.  
  99.     double unitRatio;
  100.     int docUnitIndex;
  101.     ScribusMainWindow *ap;
  102.     PrefsManager* prefsManager;
  103.  
  104.     /*! \brief Scans plugins for those that want to add a prefs widget and
  105.     hooks them up to the dialog. */
  106.     void addPlugins();
  107.  
  108.     //! \brief Resets the PrefsManager. Then call setupGui().
  109.     void restoreDefaults();
  110.     //! \brief Setup the GUI widgets by values taken from PrefsManager.
  111.     void setupGui();
  112.     void enableSignals(bool);
  113.  
  114. protected slots:
  115.     //! \brief Method to be called when user selects the icon.
  116.     virtual void showWidgetInStack(QWidget *widgetToShow);
  117.     void setActionHistoryLength();
  118.     virtual void applyChangesButton_clicked();
  119.     virtual void backToDefaults_clicked();
  120. };
  121.  
  122. #endif // PREFS_H
  123.